part of AppUtils;

extension Intent on _AppUtils {
  void reLaunchApp({bool goLogin = false, bool deleteUser = false}) {
    if (deleteUser) deleteUserModel();
    yRun(() {
      goHome(goLogin: goLogin);
    });
  }

  void goHome({bool goLogin = false, bool reCreateWhenPopToPage = true}) {
    yPages.first.yIntent(HomePage(), intentType: YIntentType.Root_Replace, popToPage: true, reCreateWhenPopToPage: reCreateWhenPopToPage);
  }
}
